
import 'core-js'
import Vue from 'vue'
import App from './App.vue'
import store from '@/store'
import router from '@/router'
import '@/router/permission'
import api from '@/api/ajax'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import ElementUi from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import '@/style/index.less'
import '@/directive/index.js'
import 'vuescroll/dist/vuescroll.css'
import vuescroll from 'vuescroll'
import loading from '@/utils/newLoading'
import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'
import * as filter from '@/filter'
Object.keys(filter).forEach(key => Vue.filter(key, filter[key]))
Vue.use(ElementUi)
Vue.use(vuescroll)
Vue.use(loading)
Vue.use(Viewer)
Viewer.setDefaults({
  Options: { 'inline': true, 'button': true, 'navbar': true, 'title': true, 'toolbar': true, 'tooltip': true, 'movable': true, 'zoomable': true, 'rotatable': true, 'scalable': true, 'transition': true, 'fullscreen': true, 'keyboard': true, 'url': 'data-source' }
})
NProgress.inc(0.2)
NProgress.configure({ easing: 'ease', speed: 500, showSpinner: false })
Vue.config.productionTip = false
Vue.prototype.$axios = api
Vue.prototype.$vuescrollConfig = {
  bar: {
    background: '#c8c8c8'
  }
}
new Vue({
  router,
  store,
  render: h => h(App),
  created () {
    store.dispatch('addRoute')
  }
}).$mount('#app')
